package com.hqyj.javaSpringBoot.modules.common.entiy;

public class ResultEntity<T> {
    //状态码
    private int status;
    //文本信息
    private String message;
    private T data;

    public ResultEntity() {
    }

    public ResultEntity(int status, String message) {
        this.status = status;
        this.message = message;
    }

    public ResultEntity(int status, String message, T data) {
        this.status = status;
        this.message = message;
        this.data = data;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public enum ResultStatus{
        SUCCESS(200),
        FAILED(500);

        public int code;

        ResultStatus(int code){
            this.code=code;
        }
    }
}
